"use strict";
exports.__esModule = true;
//两数之和
var nums = [2, 7, 11, 15], target = 9;
function objs(nums, target) {
    for (var i = 0; i < nums.length; i++) {
        for (var j = 1; j < nums.length; j++) {
            if (nums[i] + nums[j] == target) {
                return [i, j];
            }
        }
    }
}
console.log(objs(nums, target));
//回文数
function Hw(str) {
    var str1 = str.toString().split(""); //转换成字符串
    if (str1[0] == str1[str1.length - 1]) { //判断下标是赋相等
        return true;
    }
    else {
        return false;
    }
}
console.log(Hw(121));
//删除有序数组中的重复项
function Cf(nums) {
    for (var i = 0; i < nums.length; i++) {
        if (nums[i] == nums[i + 1]) {
            nums.splice(nums[i], nums[i + 1]);
        }
    }
    return nums;
}
console.log(Cf([1, 1, 2, 2, 3, 3, 4, 4]));
